import 'package:flutter/material.dart';
import 'package:flutter_app/openeye/widget/app_bar.dart';
import 'package:flutter_app/utils/back_affirm.dart';

class PageTest extends StatefulWidget {
   const PageTest({Key? key}) : super(key: key);

  @override
  _PageTestState createState() => _PageTestState();
}

class _PageTestState extends State<PageTest>  with BackAffirm{
  @override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: onWillPop,
      child: Scaffold(
        appBar:appBar("页面测试"),
        body: createSizeTestPage(),
      ),
    );
  }

  createLoadImagePage() {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Container(
          decoration: BoxDecoration(border: Border.all(color: Colors.black)),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.end,
            children: [
              Container(
                height: 50,
                width: 100,
                color: Colors.red,
              ),
              Container(
                height: 50,
                width: 100,
                color: Colors.green,
              ),
              Container(
                height: 50,
                width: 100,
                color: Colors.blue,
              ),
            ],
          ),
        ),
        Container(
          height: 50,
          width: 100,
          color: Colors.red,
        ),
        Container(
          height: 50,
          width: 100,
          color: Colors.green,
        ),
        Container(
          height: 50,
          width: 100,
          color: Colors.blue,
        ),
      ],
    );
  }

  // createSizeTestPage() {
  //   return Image.asset(
  //     "assets/images/icon_comment_grey.png",
  //     color: Colors.blue,
  //     height: 1066,
  //     width: 800,
  //     colorBlendMode: BlendMode.xor,
  //   );
  // }
  createSizeTestPage() {
    return Image.asset(
      "assets/images/icon_comment_grey.png",
      color: Colors.blue,
      height: 1066,
      width: 800,
      fit: BoxFit.fill,
      colorBlendMode: BlendMode.srcOver,
    );
  }
}
